<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>盒子模型-外补丁</title>
    <style>
        span,div{
            width: 200px;
            height: 100px;
            margin-bottom: 10px;
            background-color: lightcoral;
        }
        .sp1{
            margin-right: 20px;
        }
        .sp2{
            margin-left: 20px;
        }
        .d1{
            margin-bottom: 20px;
        }
        .d2{
            margin-top: 30px;
        }
    </style>
</head>
<body>
    <h4>1. 盒子的水平间距(左边盒子的右边距与右边盒子的左边距之和) <hr></h4>
    <span class="sp1">span1</span>
    <span class="sp2">span2</span>
    <h4>2. 盒子的垂直间距(上边盒子的下边距与下边盒子的上边距取最大值) <hr></h4>
    <div class="d1">d1</div>
    <div class="d2">d2</div>
</body>
</html>